no_arc4random_buf
authorDebian Qt/KDE Maintainers <debian-qt-kde@lists.debian.org>
Mon, 15 Oct 2018 17:45:46 +0000 (18:45 +0100)
committerDmitry Shachnev <mitya57@debian.org>
Mon, 15 Oct 2018 17:45:46 +0000 (18:45 +0100)
Gbp-Pq: Name no_arc4random_buf.diff

src/corelib/global/qrandom.cpp

index ebf9864b1533e31fa16e9e19ab274ef6571a0e14..0bdc7ea449dcf3f79926cca7e0e7182b13eea2ed 100644 (file)
@@ -48,7 +48,7 @@
 
 #include <errno.h>
 
-#if !QT_CONFIG(getentropy) && !defined(Q_OS_BSD4) && !defined(Q_OS_WIN)
+#if !QT_CONFIG(getentropy) && (!defined(Q_OS_BSD4) || defined(__GLIBC__)) && !defined(Q_OS_WIN)
 #  include "qdeadlinetimer.h"
 #  include "qhashfunctions.h"
 
@@ -258,7 +258,7 @@ static void fallback_fill(quint32 *, qsizetype) Q_DECL_NOTHROW
     // no fallback necessary, getentropy cannot fail under normal circumstances
     Q_UNREACHABLE();
 }
-#elif defined(Q_OS_BSD4)
+#elif defined(Q_OS_BSD4) && !defined(__GLIBC__)
 static void fallback_update_seed(unsigned) {}
 static void fallback_fill(quint32 *ptr, qsizetype left) Q_DECL_NOTHROW
 {